home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Files / Locations / TentativeFile.h < prev   
Text File  |  2000-06-23  |  918b  |  43 lines

  1. // TentativeFile.h
  2.  
  3. #ifndef TentativeFile_h
  4. #define TentativeFile_h
  5.  
  6. #ifndef FileLocation_h
  7. #include "FileLocation.h"
  8. #endif
  9.  
  10. class TentativeFile
  11.   {
  12.     private:
  13.         FileLocation location;
  14.         bool committed;
  15.         
  16.         // not implemented:
  17.             TentativeFile( const TentativeFile& );
  18.             void operator=( const TentativeFile& );
  19.     
  20.     public:
  21.         TentativeFile( const FileLocation&,
  22.                             FileType,
  23.                             ScriptID script = ScriptID( smSystemScript ) );
  24.  
  25.         TentativeFile( const FileLocation&,
  26.                             FileType,
  27.                             FileSignature,
  28.                             ScriptID script = ScriptID( smSystemScript ) );
  29.         
  30.         ~TentativeFile();
  31.         
  32.         const FileLocation& Location() const        { return location; }
  33.         
  34.         void Commit()            { Assert( !committed ); committed = true; }
  35.         
  36.         void CommitReplacing( const FileLocation& );
  37.         
  38.         static FileLocation GoodLocation( Volume, ConstPString nameHint );
  39.         static FileLocation GoodLocation( const FileLocation& hint );
  40.   };
  41.  
  42. #endif
  43.